The invention is in the field of computer imaging particular, the invention relates to computer processing of three-dimensional (3D) animation, e.g., in a computer game.
The general method of illustrating 3D animation is shown in FIG. 1. Referring to the figure, the 3D shapes of a plurality of objects are first stored in a database. Each object is defined in a coordinate system, referred to as a 3D-World coordinate system. According to the field of vision as seen by a viewer, a coordinate system of a 3D-Screen (field of vision) is determined. In Step P1, the 3D-World coordinate system is converted into a 3D-Screen (field of vision) coordinate system. Next, in Step P2, the 3D-Screen (field of vision) coordinate is projected onto a 2D-screen (field of vision) coordinate system. Finally, in Step P3, the figures of the object are plotted and shown in the field of vision. Current 3D engines, such as Open GL, serve to perform the function of Steps P1 to P3. However, the aforementioned process entails a large quantity of 3D plotting operations and complexities in a 3D engine. Therefore, before calculations performed by the 3D engine, it is desirable to first select the objects to be located in the field of vision. Data of the selected objects are then sent to the 3D engine for further operation.
Thus, there is a need in the art for a rapid checking method for determining whether an object is located within the field of vision.
Accordingly, an object of the invention is to provide a rapid checking method for determining whether an object is located within a field of vision, where the method can be implemented by a computer.
Another object of the invention is to provide a rapid checking method for determining whether an object is located within a field of vision, where an efficient calculation process is used.
A further object of the invention is to generate the data of the boundary box of each object by a computer without manual input, where the data of the boundary box are utilized by the method of the invention.
In order to attain the aforementioned objects, in determining whether an object is located with a field of vision, a computer serves to process the object database. First, the data of the boundary box of each object is calculated and stored. The boundary box is defined by eight vertexes and covers the whole corresponding object. Moreover, a plurality of vertexes describing the shape of the object is used in this process. Next, it is determined whether the boundary box is located within the frustum formed by a field of vision, which is enclosed by six planes.
The invention provides an efficient process, wherein if all of the eight vertexes are located outside any enclosing plane, then it is determined that the object is not within the visible range.